<div class="tabs-container">

    <div class="tab-content">
        <div id="tab-1" class="tab-pane active">

            <div class="panel-body">
                <div class="row">

                    <div class="col-sm-12">
                        <div class="m-b-md">
                            <h3>调拨单 - {{$transfer->code}}</h3>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <dl class="dl-horizontal">
                            <dt>调拨时间：</dt>
                            <dd>{{$transfer->created_at}}</dd>
                            <dt>调拨人：</dt>
                            <dd>{{$transfer->clerk->name}}</dd>
                            <dt>备注：</dt>
                            <dd>{!! $transfer->remark !!}</dd>
                        </dl>
                    </div>
                </div>


                <div class="hr-line-dashed"></div>

                <div class="table-responsive">

                        <table class="table table-hover table-striped">
                            <tbody>
                            <!--tr-th start-->
                            <tr>
                                <th>商品</th>
                                <th>货号</th>
                                <th>SKU</th>
                                <th>颜色</th>
                                <th>尺码</th>
                                <th>数量</th>
                            </tr>
                            <!--tr-th end-->

                            @foreach ($transfer->items as $item)
                                <tr>
                                    <td>{{$item->product->goods->name}}</td>
                                    <td>{{$item->product->goods->goods_no}}</td>
                                    <td>{{$item->product->sku}}</td>
                                    <td>{{$item->meta['color']}}</td>
                                    <td>{{$item->meta['size']}}</td>
                                    <td>{{$item->count}}</td>
                                </tr>
                            @endforeach

                            </tbody>
                            <tfoot style="font-weight: bold">
                            <tr>
                               <td colspan="5">合计数量</td>
                                <td colspan="4">{{$transfer->total}}</td>
                            </tr>
                            <tr>
                                <td colspan="5">合计金额</td>
                                <td colspan="4">{{$transfer->total_amount}}</td>
                            </tr>
                            </tfoot>
                        </table>
                </div><!-- /.box-body -->
            </div>
        </div>
    </div>
</div>